Skip to content

Preserve server-supplied fields on OAuth2Error#6

Open
AlexNachbaur wants to merge 2 commits intocrossapp-resource-paramfrom
error-payload
Open

Preserve server-supplied fields on OAuth2Error#6
AlexNachbaur wants to merge 2 commits intocrossapp-resource-paramfrom
error-payload

Conversation

@AlexNachbaur
Copy link
Copy Markdown
Contributor

OAuth2 error responses may include server-specific remediation hints (e.g., required_acr, max_age) alongside the standard error/ error_description/error_uri fields. These were previously discarded.

Adds an additional_fields mapping to OAuth2Error that holds any non-standard keys from the error response, and introduces OAuth2Error.from_response() as the primary way to construct an error from a parsed response body. Existing call sites in request_protocols and client are migrated to use it.

OAuth2 error responses may include server-specific remediation hints
(e.g., required_acr, max_age) alongside the standard error/
error_description/error_uri fields. These were previously discarded.

Adds an additional_fields mapping to OAuth2Error that holds any
non-standard keys from the error response, and introduces
OAuth2Error.from_response() as the primary way to construct an error
from a parsed response body. Existing call sites in request_protocols
and client are migrated to use it.
@AlexNachbaur AlexNachbaur requested a review from FeiChen-okta as a code owner May 8, 2026 16:01
Adds an Error Handling section to the README describing OAuth2Error's
shape and the new additional_fields mapping for server-supplied
remediation hints, and lists the new surface under Unreleased in the
CHANGELOG.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant